<?php /* Smarty version 2.6.12, created on 2011-07-15 11:34:04
         compiled from analysis_import_img.html */ ?>
<body>
<?php echo $this->_tpl_vars['xajax_scripts']; ?>
 
<form method='post' onsubmit='return check_form_pass();'>
<input type='hidden' name='op' value='import_file'>
<div class=form_title><?php echo @MI_IMPORT_DATA; ?>
</div>
  <br>
  <table width="50%" border='1'  align=center cellpadding='1' cellspacing="1" class='form_detail' cellspan='0'>
    <script>

function checkIsValidDate(str)
{
  if (str == "")
     return true;
  var pattern = /^(\d{4})\-(\d{1,2})\-(\d{1,2})$/g;
  if(!pattern.test(str))
     return false;
  var arrDate = str.split("-");
  if(parseInt(arrDate[0],10) < 100)
     arrDate[0] = 2000 + parseInt(arrDate[0],10) + "";
  var date = new Date(arrDate[0],(parseInt(arrDate[1],10) -1)+"",arrDate[2]);
  if(date.getYear() == arrDate[0]
     && date.getMonth() == (parseInt(arrDate[1],10)-1)+""
     && date.getDate() == arrDate[2])
     return true;
  else
     return false;
}

function check_form_pass()
{
    if (document.getElementById('imp_img_file1').value == '')
    {
        alert('<?php echo @MI_ERROR_REQUIRE_IMPORT_SOURCE; ?>
');
        return false;
    }

    return true;
}

</script>
    <tr bordercolor="#cbe5f6"> 
      <td></td>
      <td><input type='checkbox' style='cursor: pointer;' name='analysis_screen_first' value='import_img' <?php if ($this->_tpl_vars['analysis_screen_first'] == 'import_img'): ?>checked <?php endif; ?> onclick='if (this.checked) 
        { location.href="/analysis.php?op=display_import_img&analysis_screen_first=import_img"; 
        } else { location.href="/analysis.php?op=display_import_img&analysis_screen_first=analysis"; 
        }'><?php echo @MI_IMPORT_SCREEN_IMG_FIRST; ?>
</td>
    </tr>
    <tr bordercolor="#cbe5f6"> 
      <th><?php echo @MI_SELECT_KIT_ID; ?>
</th>
      <td> 
        <select name='kit_id' onchange='location.href="/analysis.php?op=display_import_img&kit_id="+this.value;'><?php $_from = $this->_tpl_vars['kit_id_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['kit_id'] => $this->_tpl_vars['kit_desc']):
?> <option value='<?php echo $this->_tpl_vars['kit_id']; ?>
'<?php if ($this->_tpl_vars['kit_id'] == $this->_tpl_vars['current_kit_id']): ?> selected<?php endif; ?>><?php echo $this->_tpl_vars['kit_id']; ?>
 - <?php echo $this->_tpl_vars['kit_desc']; ?>
</option> <?php endforeach; endif; unset($_from); ?> 
        </select></td>
    </tr>
    <?php $_from = $this->_tpl_vars['sample_images']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['field_name']):
?> 
    <tr bordercolor="#cbe5f6"> 
      <th><?php echo @MI_SAMPLE_IMAGE_FILE; ?>
 <?php echo $this->_tpl_vars['field_name']; ?>
</th>
      <td> <?php if ($this->_tpl_vars['is_use_wab_console'] == true): ?> 
        <input type='text' style='cursor: pointer;' id='imp_img_file<?php echo $this->_tpl_vars['field_name']; ?>
' size="60" name='imp_img_file<?php echo $this->_tpl_vars['field_name']; ?>
' onclick='xajax_Ajax_SelectFile("Sample Image", "JPEG Image Files(*.jpg;*,jpeg)|*.jpg;*,jpeg", "imp_img_file<?php echo $this->_tpl_vars['field_name']; ?>
");'> 
        <?php else: ?><input type='file' style='cursor: pointer;' name='imp_img_file<?php echo $this->_tpl_vars['field_name']; ?>
' size="60" /> 
        <?php endif; ?></td>
    </tr>
    <?php endforeach; endif; unset($_from); ?> 
  </table>
  <br>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
<input name="submit" type="submit" class='btn_import' value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo @MI_IMPORT; ?>
" /> 
      <input name="button" type='button' class='btn_uppage' onClick='location.href="/analysis.php?op=display";' value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<?php echo @MI_DISPLAY_INPUT; ?>
" /></td>
  </tr>
</table>
</form>
<script>
  document.getElementById('kit_id').focus();
</script>